package com.atguigu.a_operator;

public class Demo {
    public static void main(String[] args) {
        //基本的算数运算符
        System.out.println(3 + 2);
        System.out.println(3 - 2);
        System.out.println(3 * 2);
        System.out.println(1.0 * 3 / 2);//1.5
        //当被除数小于除数时,取余的结果等于被除数本身
        System.out.println(2 % 3);//2

        System.out.println("--------------------");
        short s1 = 30000;
        short s2 = 30000;

        int i = s1 + s2;
        System.out.println("i = " + i);
        System.out.println("--------------------");

        byte b1 = 10;
        byte b2 = 20;
        //以下代码哪些代码会报错 :
        //byte result = b1 + b2;
        byte result = 10 + 20;
        //byte result = 30;
        System.out.println("--------------------");
        int num1 = 20;
        double num2 = 13.14;
        double v = num1 + num2;
    }
}
